A subset of data on Major League Baseball teams from Lahman’s Baseball Database. The full data set is available in the Lahman R package.
Learn more about where this data came from at https://www.openintro.org/data/index.php?data=mlb_teams. Not, not all data sets have additional information.
| variable | label | Percent Missing Observations | data_type | Plausible Values |
|---|---|---|---|---|
| year | Year of play. | 0 | Numeric variable | [1876, 2020] |
| league_id | League the team plays in with levels AL (American League) and NL (National League). | 0 | Categorical | AL, NL |
| division_id | Division the team plays in with levels W (west), E (east) and C (central). | 0 | Categorical | C, E, W |
| rank | Team’s rank in their division at the end of the regular season. | 0 | Numeric variable | [1, 12] |
| games_played | Games played. | 0 | Numeric variable | [57, 165] |
| home_games | Games played at home. | 8 | Numeric variable | [24, 84] |
| wins | Number of games won. | 0 | Numeric variable | [9, 116] |
| losses | Number of games lost. | 0 | Numeric variable | [14, 134] |
| division_winner | Did the team win their division? Levels of Y (yes) and N (no). | 0 | Categorical | N, Y |
| wild_card_winner | Was the team a wild card winner. Levels of Y (yes) and N (no). | 0 | Categorical | N, Y |
| league_winner | Did the team win their league? Levels of Y (yes) and N (no). | 0 | Categorical | N, Y |
| world_series_winner | Did the team win the World Series? Levels of Y (yes) and N (no). | 0 | Categorical | N, Y |
| runs_scored | Number of runs scored during the season. | 0 | Numeric variable | [219, 1220] |
| at_bats | Number of at bats during the season. | 0 | Numeric variable | [1752, 5781] |
| hits | Number of hits during the season. Includes singles, doubles, triples and homeruns. | 0 | Numeric variable | [390, 1783] |
| doubles | Number of doubles hit. | 0 | Numeric variable | [39, 376] |
| triples | Number of triples hit. | 0 | Numeric variable | [3, 150] |
| homeruns | Homeruns by batters. | 0 | Numeric variable | [0, 307] |
| walks | Number of walks. | 0 | Numeric variable | [18, 835] |
| strikeouts_by_batters | Number of batters struckout. | 1 | Numeric variable | [35, 1595] |
| stolen_bases | Number of stolen bases. | 3 | Numeric variable | [13, 441] |
| caught_stealing | Number of base runners caught stealing. | 25 | Numeric variable | [3, 191] |
| batters_hit_by_pitch | Number of batters hit by a pitch. | 38 | Numeric variable | [7, 160] |
| sacrifice_flies | Number of sacrifice flies. | 49 | Numeric variable | [7, 77] |
| opponents_runs_scored | Number of runs scored by opponents. | 0 | Numeric variable | [209, 1252] |
| earned_runs_allowed | Number of earned runs allowed. | 0 | Numeric variable | [78, 1023] |
| earned_run_average | Earned run average. | 0 | Numeric variable | [1.22, 6.71] |
| complete_games | Number of games where a single pitcher played the entire game. | 0 | Numeric variable | [0, 148] |
| shutouts | Number of shutouts. | 0 | Numeric variable | [0, 32] |
| saves | Number of saves. | 0 | Numeric variable | [0, 68] |
| outs_pitches | Number of outs pitched for the season (number of innings pitched times 3). | 0 | Numeric variable | [1419, 4518] |
| hits_allowed | Number of hits made by opponents. | 0 | Numeric variable | [376, 1993] |
| homeruns_allowed | Number of homeruns hit by opponents. | 0 | Numeric variable | [2, 305] |
| walks_allowed | Number of opponents who were walked. | 0 | Numeric variable | [24, 827] |
| strikeouts_by_pitchers | Number of opponents who were struckout. | 0 | Numeric variable | [22, 1687] |
| errors | Number of errors. | 0 | Numeric variable | [20, 639] |
| double_plays | Number of double plays. | 0 | Numeric variable | [18, 217] |
| fielding_percentage | Teams fielding percentage. | 0 | Numeric variable | [0.825, 0.991] |
| team_name | Full name of team. | 0 | Categorical | Anaheim Angels, Arizona Diamondbacks, Atlanta Braves, Baltimore Orioles, Boston Americans, Boston Beaneaters, Boston Bees, Boston Braves, Boston Doves, Boston Red Caps, Boston Red Sox, Boston Rustlers, Brooklyn Bridegrooms, Brooklyn Dodgers, Brooklyn Grooms, Brooklyn Robins, Brooklyn Superbas, Buffalo Bisons, California Angels, Chicago Colts, Chicago Cubs, Chicago Orphans, Chicago White Sox, Chicago White Stockings, Cincinnati Redlegs, Cincinnati Reds, Cleveland Blues, Cleveland Bronchos, Cleveland Indians, Cleveland Naps, Cleveland Spiders, Colorado Rockies, Detroit Tigers, Detroit Wolverines, Florida Marlins, Hartford Dark Blues, Houston Astros, Houston Colt .45’s, Indianapolis Blues, Indianapolis Hoosiers, Kansas City Athletics, Kansas City Cowboys, Kansas City Royals, Los Angeles Angels, Los Angeles Angels of Anaheim, Los Angeles Dodgers, Louisville Colonels, Louisville Grays, Miami Marlins, Milwaukee Braves, Milwaukee Brewers, Milwaukee Grays, Minnesota Twins, Montreal Expos, New York Giants, New York Gothams, New York Highlanders, New York Mets, New York Mutuals, New York Yankees, Oakland Athletics, Philadelphia Athletics, Philadelphia Blue Jays, Philadelphia Phillies, Philadelphia Quakers, Pittsburg Alleghenys, Pittsburgh Pirates, Providence Grays, San Diego Padres, San Francisco Giants, Seattle Mariners, Seattle Pilots, St. Louis Brown Stockings, St. Louis Browns, St. Louis Cardinals, St. Louis Maroons, St. Louis Perfectos, Syracuse Stars, Tampa Bay Devil Rays, Tampa Bay Rays, Texas Rangers, Toronto Blue Jays, Troy Trojans, Washington Nationals, Washington Senators, Worcester Ruby Legs |
| ball_park | Home ballpark name. | 0 | Categorical | 23rd Street Grounds, 3Com Park, American League Park I, American League Park II, Ameriquest Field, Anaheim Stadium, Angel Stadium, Angel Stadium of Anaheim, Angels Stadium of Anaheim, Arlington Stadium, Association Park, Astrodome, AT&T Park, Athletic Park I, Athletic Park II, Atlanta-Fulton County Stadium, Avenue Grounds, Baker Bowl, Baker Bowl/Shibe Park, Bank One Ballpark, Bank Street Grounds, Bennett Park, Boundary Field, Braves Field, Briggs Stadium, Busch Stadium II, Busch Stadium III, Candlestick Park, Chase Field, Cinergy Field, Citi Field, Citizens Bank Park, Cleveland Stadium, Colt Stadium, Columbia Park, Comerica Park, Comiskey Park, Comiskey Park II, Connie Mack Stadium, Coors Field, County Stadium, Crosley Field, Crosley Field/Riverfront Stadium, Dodger Stadium, Dolphin Stadium, Eastern Park, Ebbets Field, Eclipse Park I, Eclipse Park II, Edison International Field, Enron Field, Exhibition Stadium, Exhibition Stadium /Skydome, Exposition Park, Exposition Park/Forbes Field, Fenway Park I, Fenway Park I / Braves Field, Fenway Park II, Forbes Field, Forbes Field/Three Rivers Stadium, Globe Life Field, Globe Life Park in Arlington, Great American Ball Park, Griffith Stadium I, Griffith Stadium II, Guaranteed Rate Field, Hartford Ball Club Grounds, Haymakers’ Grounds, Hilltop Park, Hubert H Humphrey Metrodome, Huntington Avenue Grounds, Jack Murphy Stadium, Jacobs Field, Jarry Park, Jefferson Street Grounds, Joe Robbie Stadium, Kauffman Stadium, Kennard Street Park, Kingdome, Kingdome / Safeco Field, Lake Front Park I, Lake Front Park I/Lake Front Park II, Lake Front Park II, League Park I, League Park I in Cincinnati, League Park II, League Park II in Cincinnati, League Park II/Cleveland Stadium, Lloyd Street Grounds, Los Angeles Memorial Coliseum, Louisville Baseball Park, Marlins Park, McAfee Coliseum, Memorial Stadium, Messer Street Grounds, Metropolitan Stadium, Mile High Stadium, Miller Park, Minute Maid Park, Municipal Stadium I, Municipal Stadium II, National League Park, Nationals Park, Navin Field, Network Associates Coliseum, Newell Park, O.co Coliseum, Oakland-Alameda County Coliseum, Oakland Coliseum, Olympic Park I, Oracle Park, Oriole Park, Oriole Park at Camden Yards, PacBell Park, Palace of the Fans, Petco Park, Philadelphia Baseball Grounds, PNC Park, Polo Grounds I, Polo Grounds II, Polo Grounds III, Polo Grounds III/Polo Grounds IV, Polo Grounds IV, Pro Player Stadium, Progressive Field, Putnam Grounds, Qualcomm Stadium, R.F.K. Stadium, Rangers Ballpark in Arlington, Recreation Park, Riverfront Stadium, Riverside Park, Robison Field, Robison Field/Sportsman’s Park IV, Rogers Centre, Royals Stadium, Safeco Field, Sahlen Field, SBC Park, Seals Stadium, Shea Stadium, Shibe Park, Sicks Stadium, Skydome, South End Grounds I, South End Grounds II, South End Grounds II / Congress Street Grounds / South End Grounds III, South End Grounds III, South Side Park I, South Side Park II, South Side Park II/Comiskey Park, South Street Park, Sportsman’s Park I, Sportsman’s Park III, Sportsman’s Park IV, Sportsman’s Park IV/Busch Stadium II, Stade Olympique, Stade Olympique/Hiram Bithorn Stadium, Sun Life Stadium, SunTrust Park, Swampdoodle Grounds, T-Mobile Park, Target Field, The Ballpark at Arlington, Three Rivers Stadium, Tiger Stadium, Tropicana Field, Troy Ball Club Grounds, Turner Field, U.S. Cellular Field, Union Grounds (Brooklyn), Union Park, Veterans Stadium, Washington Park II, Washington Park III, West Side Park I, West Side Park II, Worcester Driving Park Grounds, Wrigley Field, Wrigley Field (LA), Yankee Stadium I, Yankee Stadium II, Yankee Stadium III |
| home_attendance | Home attendance total. | 4 | Numeric variable | [0, 4483350] |